<script setup lang="ts">
const props = defineProps<{
  num: number
  modelValue: number
}>()
const emit = defineEmits<{
  (e: 'update:num', val: number): void
  (e: 'update:modelValue2', val: number): void
}>()
const addNum = () => {
  emit('update:num', props.num + 2)
}
const subNum = () => {
  emit('update:modelValue2', props.modelValue - 10)
}
</script>

<template>
  <div class="test-son-page">
    <h1>TestSon</h1>
    <h2>数字{{ num }}</h2>
    <h2>大数字{{ modelValue }}</h2>
    <button @click="addNum">数字加2</button>
    <button @click="subNum">数字减10</button>
  </div>
</template>

<style scoped lang="scss"></style>
